﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TradeClient.Logic.TradeCore
{
    /// <summary>
    /// 账号管理类
    /// </summary>
    public class AccountManager
    {
        private static CtpAccount ctpAccount;

        public static CtpAccount GetCtpAccount()
        {
            if (ctpAccount == null)
            {
                string[] frontTd = { @"tcp://asp-sim2-front1.financial-trading-platform.com:26205" };
                //string[] frontTd = { @"tcp://cifco-front1.financial-trading-platform.com:41205" };

                ctpAccount = new CtpAccount();

                ctpAccount.Broker = "4030";
                ctpAccount.Account = "80002863";
                ctpAccount.Password = "888888";

                ctpAccount.CtpTradeObject = new CtpTrade(ctpAccount, frontTd);
            }

            return ctpAccount;
        }
    }
}
